<?php
require_once "protecao.php";

//Evitando cache de arquivo
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
header('Pragma: no-cache');
header("Cache: no-cache");
header('Expires: 0');
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>.: Pizza Mia - Administração :.</title>
		<meta name="keywords" content="pizza, pizzaria, delyvery, calabreza, mussarela" />
		<meta name="description" content="Pizzaria Massa Mia, as melhores pizzas da região metropolitana do Recife!" />
		<link href="style.css" rel="stylesheet" type="text/css" />
		<script language="javascript" src="../lib/jquery-1.7.1.min.js" type="text/javascript"></script>
		<script language="javascript" type="text/javascript">
			$(document).ready(function() {

				$('#nav li').hover(function() {
					//show its submenu
					$('ul', this).slideDown(100);

				}, function() {
					//hide its submenu
					$('ul', this).slideUp(100);
				});
			});

		</script>
	</head>
	<body>
		<div id="container">
			<div id="header_section"></div>
			<ul id="nav">
				<li>
					<a href="index.php" class="selected">Pedidos</a>
				</li>
				<li>
					<a href="index.php?module=produtos">Produtos</a>
					<ul>
						<li>
							<a href="index.php?module=cad_prod">Cadastrar</a>
						</li>
					</ul>
					<div class="clear"></div>
				</li>
				<li>
					<a href="index.php?module=clientes">Clientes</a>
					<ul>
						<li>
							<a href="index.php?module=cad_cli">Cadastrar</a>
						</li>
					</ul>
					<div class="clear"></div>
				</li>
				<li>
					<a href="#">Relatórios</a>
				</li>
				<li>
					<a href="logout.php">Sair</a>
				</li>
			</ul>
			<div class="clear"></div>
			<div id="content">
				<?php
				if (isset($_GET['module'])) {
					switch ($_GET['module']) {
						case "cad_prod" :
							include "cadastro_produto.html";
							break;
						case "produtos" :
							include "listar_produtos.php";
							break;
						case "cad_cli" :
							include "cadastro_cliente.html";
							break;
						case "clientes" :
							include "listar_clientes.php";
							break;
						case "" :
							include "listar_pedidos.php";
							break;
					}
				} else {
					include "listar_pedidos.php";
				}
				?>
			</div>
		</div>
		<div id="footer">
			<div class="top">
				<a href="index.php">Home</a> | <a href="sobre.html">Quem Somos</a> | <a href="pizzas.html">Pizzas</a>
			</div>
			<div class="middle">
				Copyright © 2011 - Pizzaria Massa Mia
			</div>
			<div class="button">
				<a href="http://validator.w3.org/check?uri=referer"> <img height="31" alt="Valid XHTML 1.0 Transitional" src="http://www.w3.org/Icons/valid-xhtml10" width="88" vspace="8" border="0" /> </a>
				<a href="http://jigsaw.w3.org/css-validator/check/referer"> <img alt="Valid CSS!" src="http://jigsaw.w3.org/css-validator/images/vcss-blue" vspace="8" border="0" /> </a>
			</div>
		</div>
	</body>
</html>